package com.slz3.business.module.configManagement.conActivityIndex.steward;

import com.slz3.business.module.configManagement.conActivityIndex.domain.ConActivityIndex;
import com.slz3.business.module.configManagement.conActivityIndex.domain.ConActivityIndexCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConActivityIndexResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(ConActivityIndex.class).flatMap(conActivityIndex ->
                ConActivityIndexResController.add(req, conActivityIndex)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(ConActivityIndexCondition.class).flatMap(conActivityIndexCondition ->
                ConActivityIndexResController.delete(req, conActivityIndexCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(ConActivityIndex.class).flatMap(conActivityIndex ->
                ConActivityIndexResController.modify(req, conActivityIndex)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return ConActivityIndexResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return ConActivityIndexResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return ConActivityIndexResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(ConActivityIndexCondition.class).flatMap(conActivityIndexCondition ->
                ConActivityIndexResController.auditSubmit(req, conActivityIndexCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(ConActivityIndexCondition.class).flatMap(conActivityIndexCondition ->
                ConActivityIndexResController.audit(req, conActivityIndexCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(ConActivityIndexCondition.class).flatMap(conActivityIndexCondition ->
                ConActivityIndexResController.auditReject(req, conActivityIndexCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(ConActivityIndexCondition.class).flatMap(conActivityIndexCondition ->
                ConActivityIndexResController.usingEnable(req, conActivityIndexCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(ConActivityIndexCondition.class).flatMap(conActivityIndexCondition ->
                ConActivityIndexResController.usingDisable(req, conActivityIndexCondition)
        );
    }   

}
